const modulesFiles = import.meta.glob("../../views/*/language/en.ts",{ eager: true,import:"default" }); //引入页面级英文ts文件
const dynamicModulesFiles = import.meta.glob("../../dynamicViews/*/language/en.ts",{ eager: true,import:"default" }); //引入动态页面级英文ts文件
const modulesComponents = import.meta.glob("../../components/*/language/en.ts",{ eager: true,import:"default" }); //引入组件级英文ts文件
const obj = {};
for (const path in modulesFiles) {
  const splitArr: Array<string> = path.split('/');
  const indexOfViews:number = splitArr.indexOf('views');
  const indexOfLanguage: number = splitArr.indexOf('language');
  const str:string = splitArr.slice(indexOfViews,indexOfLanguage).join("_")
  obj[str] = modulesFiles[path]
}
for (const path in dynamicModulesFiles) {
  const splitArr: Array<string> = path.split('/');
  const indexOfViews:number = splitArr.indexOf('dynamicViews');
  const indexOfLanguage: number = splitArr.indexOf('language');
  const str:string = splitArr.slice(indexOfViews,indexOfLanguage).join("_")
  obj[str] = dynamicModulesFiles[path]
}
for (const path in modulesComponents) {
  const splitArr: Array<string> = path.split('/');
  const indexOfViews:number = splitArr.indexOf('components');
  const indexOfLanguage: number = splitArr.indexOf('language');
  const str:string = splitArr.slice(indexOfViews,indexOfLanguage).join("_")
  obj[str] = modulesComponents[path]
}

export default {
  ...obj
}